<?PHP

class ProviderBO extends BusinessObject{

	function setAttributes(){
		$this->fields   = array(
			'id'        =>  'proID',
			'name' =>  'proName',
			'email'  =>  'proEmail',
			'password'   =>  'proPassword'
		);

		BusinessObject::setAttributes();
	}

	/* constuctor */
	function ProviderBO() {
		/* super(tableName) */
		BusinessObject::BusinessObject("providers");
		$this->setAttributes();
	}
	
	function checkEmail(){
		$u = new ProviderBO();
		$u->email = $this->email;
		$u->Load(0,1);
		if($u->Next()){
			if($u->id != $this->id)
			return(false);
		}
		return(true);
	}
}
?>
